<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div id="app">
        <!-- v-bind不支持驼峰   可以-代替 -->
        <cpn :cinfo ="info" :child-my-message="message"></cpn>
    </div>
    <template id="cpn">
        <div>
            <h2>{{cinfo}}</h2>
            <h2>{{childMyMessage}}</h2>
        </div>
       
    </template>
    <script src="../js/vue.js"></script>
    <script>
       let cpn ={
           template:'#cpn',
           props:{
               cinfo:{
                   type:Object,
                   default(){
                       return {}
                   }
               },
               childMyMessage:{
                    type:String,
                    default:''
               }
           }
       }
        const app = new Vue({
            el:'#app',
            data:{
                message:'你好呀',
                info:{
                    name:"ting",
                    age:18,
                    height:1.61
                    
                }
            },
            components:{
                cpn
            }
        })
    </script>
</body>
</html>